﻿using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class scripts_GetSessions : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["Id"] != null && Session["isLogin"] != null)
        {
            NameValueCollection request = Request.QueryString;


            switch (request.GetKey(0).ToString())
            {
                /// Add keys for later use
                case "UserId": Response.Write(Session["Id"]);
                    break;
                case "DeviceId": Response.Write("");
                    break;
                default: Response.Write("401"); // Error in QueryString - Error Code 401
                    break;
            }
        }
        else {
            Response.Write("402");// Session Expired - Error Code 402
        }

    }
}